//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { UnipayApplets, UnipayAppletsResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooUnipayAppletsList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<UnipayAppletsResponse>(`/uctoo/unipay_applets/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooUnipayApplets = async (id: string) => {
  return requestClient.get<UnipayApplets>(`/uctoo/unipay_applets/${id}`);
};

export const adductooUnipayApplets = async (data: Partial<UnipayApplets>) => {
  return requestClient.post<UnipayApplets>('/uctoo/unipay_applets/add', data);
};

export const edituctooUnipayApplets = async (data: Partial<UnipayApplets>) => {
  return requestClient.post<UnipayApplets>('/uctoo/unipay_applets/edit', data);
};

export const deleteuctooUnipayApplets = async (id: string) => {
  return requestClient.post<any>('/uctoo/unipay_applets/del', { id });
};
